package GST;

import static org.junit.Assert.*;

public class Test {

	@org.junit.Test
	public void test() {
		Sosanh ss =new Sosanh();
		String result;
		//bat thuong
		result =ss.sosanh(2, 1, 2);
		assertEquals(result,"Error");
		
		result =ss.sosanh(1, 2, 0);
		assertEquals(result,"1.0");
		

		result=ss.sosanh(-1, -2, -1);
		assertEquals(result,"Error");
		
		result=ss.sosanh(1,-1, 2);
		assertEquals(result,"Error");
		
		
		result =ss.sosanh(1, 2, 3);
		assertEquals(result,"2.0");
		//binh thuong
		result =ss.sosanh(1, 3, 2);
		assertEquals(result,"2.0");
		
		
		result=ss.sosanh(-4, -2, -3);
		assertEquals(result,"-3.0");
		
		result=ss.sosanh(-4,-2,-1);
		assertEquals(result,"-2.0");
		
		result=ss.sosanh(-4, -2, -3);
		assertEquals(result,"-3.0");
		
		result=ss.sosanh(-4, 1, -1);
		assertEquals(result,"-1.0");
		
		result=ss.sosanh(-4, 1, -5);
		assertEquals(result,"-4.0");
		
		result=ss.sosanh(-4, 1, 2);
		assertEquals(result,"1.0");		
		
		//Bien
		
		result =ss.sosanh(1, 1, 2);
		assertEquals(result,"1.0");
		
		result =ss.sosanh(1, 1, 1);
		assertEquals(result,"1.0");

		result =ss.sosanh(1, 2, 1);
		assertEquals(result,"1.0");
	
		result =ss.sosanh(1, 3, 3);
		assertEquals(result,"3.0");
	}

}
